home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / dblrou1r / mbox.frm < prev    next >
Text File  |  1998-11-04  |  5KB  |  155 lines

  1. VERSION 5.00
  2. Object = "{3BA9BED1-71BA-11D2-A2CD-702C4EC10700}#1.0#0"; "Gradients.ocx"
  3. Begin VB.Form MBox 
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form2"
  6.    ClientHeight    =   1575
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   4335
  10.    Icon            =   "MBox.frx":0000
  11.    LinkTopic       =   "Form2"
  12.    ScaleHeight     =   105
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   289
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin Gradients.Gradient Gradient1 
  18.       Height          =   1215
  19.       Left            =   0
  20.       Top             =   360
  21.       Width           =   4335
  22.       _ExtentX        =   7646
  23.       _ExtentY        =   2143
  24.       Begin VB.CommandButton btnOut 
  25.          DisabledPicture =   "MBox.frx":0E42
  26.          DownPicture     =   "MBox.frx":21FC
  27.          Height          =   495
  28.          Left            =   1200
  29.          Picture         =   "MBox.frx":502E
  30.          Style           =   1  'Graphical
  31.          TabIndex        =   2
  32.          Top             =   120
  33.          Width           =   2055
  34.       End
  35.       Begin VB.Timer Timer1 
  36.          Enabled         =   0   'False
  37.          Interval        =   1000
  38.          Left            =   0
  39.          Top             =   0
  40.       End
  41.       Begin VB.CommandButton btnOK 
  42.          DisabledPicture =   "MBox.frx":7E60
  43.          DownPicture     =   "MBox.frx":9B3E
  44.          Height          =   375
  45.          Left            =   240
  46.          Picture         =   "MBox.frx":E4F0
  47.          Style           =   1  'Graphical
  48.          TabIndex        =   0
  49.          Top             =   720
  50.          Width           =   3855
  51.       End
  52.    End
  53.    Begin VB.Label lblTitle 
  54.       Alignment       =   2  'Center
  55.       BackColor       =   &H00400000&
  56.       Caption         =   "Thang"
  57.       BeginProperty Font 
  58.          Name            =   "Comic Sans MS"
  59.          Size            =   12
  60.          Charset         =   0
  61.          Weight          =   400
  62.          Underline       =   0   'False
  63.          Italic          =   0   'False
  64.          Strikethrough   =   0   'False
  65.       EndProperty
  66.       ForeColor       =   &H0000FFFF&
  67.       Height          =   375
  68.       Left            =   0
  69.       TabIndex        =   1
  70.       Top             =   0
  71.       Width           =   4335
  72.    End
  73. End
  74. Attribute VB_Name = "MBox"
  75. Attribute VB_GlobalNameSpace = False
  76. Attribute VB_Creatable = False
  77. Attribute VB_PredeclaredId = True
  78. Attribute VB_Exposed = False
  79. ' The messagebox form.
  80. ' Makes use of my very own -=FREEWARE=- gradient control! Nifty huh?
  81.  
  82. Private bActive As Boolean
  83.  
  84. Private Sub btnOK_Click()
  85.       bActive = False
  86.       btnOK.Enabled = False
  87.       Timer1.Enabled = True
  88. End Sub
  89.  
  90. Private Sub btnOut_Click()
  91.       OutPutfrm.Show vbModal, Me
  92. End Sub
  93.  
  94. Private Sub Form_Load()
  95.       Timer1.Enabled = False
  96.  
  97.       bActive = True
  98.  
  99.       Gradient1.Red1 = 254
  100.       Gradient1.Green1 = 254
  101.       Gradient1.Blue1 = 1
  102.       Gradient1.Red2 = 254
  103.       Gradient1.Green2 = 1
  104.       Gradient1.Blue2 = 1
  105.       
  106.       Me.Show
  107. End Sub
  108.  
  109. Private Sub Form_Paint()
  110.  
  111.       lblTitle.Refresh
  112.  
  113.       Dim RedVel, GreenVel, BlueVel, RedVel1, GreenVel2, BlueVel2 As Integer
  114.       RedVel = 1
  115.       GreenVel = 3
  116.       BlueVel = 2
  117.       RedVel2 = 2
  118.       GreenVel2 = 1
  119.       BlueVel2 = 3
  120.  
  121.       While (bActive)
  122.             DoEvents
  123.  
  124.             Gradient1.Red1 = Gradient1.Red1 + RedVel
  125.                   If Gradient1.Red1 >= 255 Then RedVel = -RedVel
  126.                   If Gradient1.Red1 <= 0 Then RedVel = -RedVel
  127.  
  128.             Gradient1.Green1 = Gradient1.Green1 + GreenVel
  129.                   If Gradient1.Green1 >= 255 Then GreenVel = -GreenVel
  130.                   If Gradient1.Green1 <= 0 Then GreenVel = -GreenVel
  131.  
  132.             Gradient1.Blue1 = Gradient1.Blue1 + BlueVel
  133.                   If Gradient1.Blue1 >= 255 Then BlueVel = -BlueVel
  134.                   If Gradient1.Blue1 <= 0 Then BlueVel = -BlueVel
  135.                   
  136.             Gradient1.Red2 = Gradient1.Red2 + RedVel2
  137.                   If Gradient1.Red2 >= 255 Then RedVel2 = -RedVel2
  138.                   If Gradient1.Red2 <= 0 Then RedVel2 = -RedVel2
  139.  
  140.             Gradient1.Green2 = Gradient1.Green2 + GreenVel2
  141.                   If Gradient1.Green2 >= 255 Then GreenVel2 = -GreenVel2
  142.                   If Gradient1.Green2 <= 0 Then GreenVel2 = -GreenVel2
  143.  
  144.             Gradient1.Blue2 = Gradient1.Blue2 + BlueVel2
  145.                   If Gradient1.Blue2 >= 255 Then BlueVel2 = -BlueVel2
  146.                   If Gradient1.Blue2 <= 0 Then BlueVel2 = -BlueVel2
  147.  
  148.             Gradient1.RefreshDisplay
  149.       Wend
  150. End Sub
  151.  
  152. Private Sub Timer1_Timer()
  153.       Unload Me
  154. End Sub
  155.